﻿namespace Gobang.ToolClass.Model
{
    /// <summary>
    /// 消息类
    /// </summary>
    [Serializable]
    public class MsgModel
    {
        /// <summary>
        /// 发送方编号
        /// </summary>
        public string SId { get; set; } = string.Empty;
        /// <summary>
        /// 发送方Ip
        /// </summary>
        public string SIp { get; set; } = string.Empty;
        /// <summary>
        /// 发送方端口
        /// </summary>
        public string SPort { get; set; } = string.Empty;
        /// <summary>
        /// 接收方编号
        /// </summary>
        public string RId { get; set; } = string.Empty;
        /// <summary>
        /// 接收方Ip
        /// </summary>
        public string RIp { get; set; } = string.Empty;
        /// <summary>
        /// 接收方端口
        /// </summary>
        public string RPort { get; set; } = string.Empty;
        /// <summary>
        /// 发送消息类型
        /// </summary>
        public MsgType SendMsgType { get; set; } = MsgType.None;
        /// <summary>
        /// 消息命令
        /// </summary>
        public MsgCommand SendMsgCommand { get; set; } = MsgCommand.None;
        /// <summary>
        /// 消息Id（UUID）
        /// </summary>
        public string MsgId { get; set; } = string.Empty;
        /// <summary>
        /// 发送数据
        /// </summary>
        public byte[] Data { get; set; } = new byte[0];
        public string DataStr { get; set; } = string.Empty;
        /// <summary>
        /// 分数
        /// </summary>
        public int Fraction { get; set; }
    }
}
